package com.maxwell.googleplay.factory;

import com.maxwell.googleplay.manager.ThreadPoolProxy;

/**
 * @author  yue
 * @创建时间 2016-3-30下午8:12:55
 * @描述     TODO
 * 
 */
public class ThreadPoolFactory {
	static ThreadPoolProxy mNormalPool;
	static ThreadPoolProxy mDownloadPool;
	
	/**得到普通的线程池***/
	public static ThreadPoolProxy getNormalPool(){
		if(mNormalPool == null){
			synchronized(ThreadPoolProxy.class){
				if(mNormalPool == null){
					mNormalPool = new ThreadPoolProxy(5, 5, 3000);
				}
			}
		}
		return mNormalPool;
	}
	
	/**得到下载的线程池***/
	public static ThreadPoolProxy getDownloadPool(){
		if(mDownloadPool == null){
			synchronized(ThreadPoolProxy.class){
				if(mDownloadPool == null){
					mDownloadPool = new ThreadPoolProxy(3, 3, 3000);
				}
			}
		}
		return mDownloadPool;
	}
}
